<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('车辆出入订单列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <label>停车场编号：</label>
                                <input type="text" name="parkNo"/>
                            </li>
                            <li>
                                <label>车牌号：</label>
                                <input type="text" name="plateNo"/>
                            </li>
                            <li>
                                <label>车辆进场时间：</label>
                                <input type="text" class="time-input" placeholder="请选择车辆进场时间" name="inTime"/>
                            </li>
                            <li>
                                <label>车辆离场时间：</label>
                                <input type="text" class="time-input" placeholder="请选择车辆离场时间" name="leaveTime"/>
                            </li>
                            <li>
                                <label>订单编号：</label>
                                <input type="text" name="tradeNo"/>
                            </li>
                            <li>
                                <label>支付编号：</label>
                                <input type="text" name="payNo"/>
                            </li>
                            <li>
                                <label>实缴金额：</label>
                                <input type="text" name="totalFee"/>
                            </li>
                            <li>
                                <label>应缴金额：</label>
                                <input type="text" name="serviceFee"/>
                            </li>
                            <li>
                                <label>道闸编号：</label>
                                <input type="text" name="gateNo"/>
                            </li>
                            <li>
                                <label>订单生成时间：</label>
                                <input type="text" class="time-input" placeholder="请选择订单生成时间" name="orderTime"/>
                            </li>
                            <li>
                                <label>支付结果更新时间：</label>
                                <input type="text" class="time-input" placeholder="请选择支付结果更新时间" name="payTime"/>
                            </li>
                            <li>
                                <label>代扣确认标记，0：未确认；1：已确认：</label>
                                <input type="text" name="flag"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:order:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:order:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:order:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:order:export">
                    <i class="fa fa-download"></i> 导出
                </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:order:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:order:remove')}]];
        var prefix = ctx + "system/order";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "车辆出入订单",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id',
                    title: '同一次车辆出入主键',
                    visible: false
                },
                {
                    field: 'parkNo',
                    title: '停车场编号'
                },
                {
                    field: 'plateNo',
                    title: '车牌号'
                },
                {
                    field: 'inTime',
                    title: '车辆进场时间'
                },
                {
                    field: 'leaveTime',
                    title: '车辆离场时间'
                },
                {
                    field: 'tradeNo',
                    title: '订单编号'
                },
                {
                    field: 'payNo',
                    title: '支付编号'
                },
                {
                    field: 'totalFee',
                    title: '实缴金额'
                },
                {
                    field: 'serviceFee',
                    title: '应缴金额'
                },
                {
                    field: 'gateNo',
                    title: '道闸编号'
                },
                {
                    field: 'status',
                    title: '1:待支付；2：支付成功；3：支付失败;4:无费用出场'
                },
                {
                    field: 'orderTime',
                    title: '订单生成时间'
                },
                {
                    field: 'payTime',
                    title: '支付结果更新时间'
                },
                {
                    field: 'parkName',
                    title: '停车场名称'
                },
                {
                    field: 'type',
                    title: '订单类型：1：无感支付；2：扫码支付;3:代扣'
                },
                {
                    field: 'flag',
                    title: '代扣确认标记，0：未确认；1：已确认'
                },
                {
                    field: 'resPay',
                    title: '主动支付响应'
                },
                {
                    field: 'resPayNotify',
                    title: '支付通知响应'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>